package com.sdgakj.entity;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name="f_feed_comment")
public class FeedComment extends IdEntity {

	private Feed feed;
	private Long userId;		// 评论用户id
	private Long replyUserid; // 回复用户id
	private String content; //回复内容
	private Integer state;   // 状态
	private String deltag; //是否删除
	private Date createDate; //创建时间
	private Date updateDate; //更新时间
/*	private FeedTag tagId;
	public FeedTag getTagId() {
		return tagId;
	}

	public void setTagId(FeedTag tagId) {
		this.tagId = tagId;
	}*/
   //private FeedTag feedTag;  //标签类型
/*@ManyToOne()
@JoinColumn(name = "tag_id")
public FeedTag getFeedTag() {
	return feedTag;
}
	public void setFeedTag(FeedTag feedTag) {
		this.feedTag = feedTag;
	}

 	public FeedComment() {

	}*/
	
    @ManyToOne()
    @JoinColumn(name = "feed_id")
	public Feed getFeed() {
		return feed;
	}
	public void setFeed(Feed feed) {
		this.feed = feed;
	}

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getReplyUserid() {
        return replyUserid;
    }

    public void setReplyUserid(Long replyUserid) {
        this.replyUserid = replyUserid;
    }

    public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	
	public String getDeltag() {
		return deltag;
	}
	public void setDeltag(String deltag) {
		this.deltag = deltag;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	public Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	
}
